A Unified Theory of Sand Sculptures